// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui'
import VueAwesomeSwiper from 'vue-awesome-swiper'
import store from './store/index'
import axios from 'axios'
import Qs from 'qs'
import VueAxios from 'vue-axios'
import 'lib-flexible'
import './assets/fonts/iconfont.css'
import './assets/styles/global.scss'
import 'swiper/dist/css/swiper.css'
import {setCookie, getCookie, delCookie, clearCookie} from '@/assets/js/cookie.js'

Vue.use(ElementUI)
Vue.config.productionTip = false
Vue.use(VueAwesomeSwiper)
Vue.use(VueAxios, axios)

// 获取本地存储的用户信息
Vue.prototype.$id = sessionStorage.getItem('id')
Vue.prototype.$sessionId = sessionStorage.getItem('sessionId')
Vue.prototype.$intergration = sessionStorage.getItem('integration')
console.log(this.$id, this.$sessionId, this.$intergration)

axios.defaults.baseURL = 'http://localhost:8999'
// axios.defaults.baseURL = 'http://123.56.187.128:8999'

Vue.prototype.$axios = axios
Vue.prototype.$qs = Qs

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  beforeMount () {
    Vue.prototype.$cookieStore = {
      setCookie,
      getCookie,
      delCookie,
      clearCookie
    }
  },
  components: { App },
  template: '<App/>'
})
